import React from 'react'
import {
    Form,
    Button,
    message,
    Switch,
    Card,
    Icon,
    Input,
    Table,
    Popconfirm,
    Divider,
} from 'antd'
import { observer, inject } from 'mobx-react'
import _ from 'lodash'
import util from '../../../common/util'
import Tip from "../../common/tip"

const FormItem = Form.Item

@inject("store")
@observer
class ExhibitorList extends React.Component {
    constructor() {
        super()
    }
    componentDidMount = () =>  {
        this.props.store.actions.getExhibitorList()
    }
    render() {
        let {store} = this.props
        let data = store.exhibitorList
        const actions = store.actions
        const columns = [{
            title: '展览名称',
            dataIndex: 'expoName',
        }, {
            title: '时间',
            dataIndex: 'createTime',
        }, {
            title: '展馆',
            dataIndex: 'hallName',
        }, {
            title: '展区',
            dataIndex: 'areaName',
        }, {
            title: '展位',
            dataIndex: 'stand',
            render: (text,record) => <span>{record.standWord}{record.standNumber}</span>,
        },{
            title: '操作',
            key: 'action',
            width: 360,
            render: (text, record) => (
                <span>
                  <a href={`/console/exhibition/exhibitorInfo/${record.id}`}>修改信息</a>
                </span>
            ),
        }
        ];
        return (
            <div>
                <Tip title={"已登录展览"}/>
                <Table
                    columns={columns}
                    dataSource={data.slice()}
                />
            </div>
        )
    }
}

export default ExhibitorList

